package com.oa.entity;

import java.util.Date;
import java.util.HashSet;
import java.util.Set;

/**
 * 主题
 */
public class Topic extends Article {

	public static final int TYPE_NORMAL = 0;

	private int topicType;// 类型
	private int replyCount;// 回复数量
	private Date lastUpdateTime;// 最后更新时间（主题发表时间或最后回复的时间）
	private Reply lastReply;// 最后回复

	// 主题-->版块 1:1
	private Forum forum;// 所属版块
	// 主题-->回复 1:N
	private Set<Reply> replies = new HashSet<Reply>();

	public int getTopicType() {
		return topicType;
	}

	public void setTopicType(int topicType) {
		this.topicType = topicType;
	}

	public int getReplyCount() {
		return replyCount;
	}

	public void setReplyCount(int replyCount) {
		this.replyCount = replyCount;
	}

	public Date getLastUpdateTime() {
		return lastUpdateTime;
	}

	public void setLastUpdateTime(Date lastUpdateTime) {
		this.lastUpdateTime = lastUpdateTime;
	}

	public Reply getLastReply() {
		return lastReply;
	}

	public void setLastReply(Reply lastReply) {
		this.lastReply = lastReply;
	}

	public Forum getForum() {
		return forum;
	}

	public void setForum(Forum forum) {
		this.forum = forum;
	}

	public Set<Reply> getReplies() {
		return replies;
	}

	public void setReplies(Set<Reply> replies) {
		this.replies = replies;
	}

	@Override
	public String toString() {
		return "Topic [topicType=" + topicType + ", replyCount=" + replyCount
				+ ", lastUpdateTime=" + lastUpdateTime + ", lastReply="
				+ lastReply + ", forum=" + forum + ", replies=" + replies + "]";
	}
	

}
